cmake_minimum_required(VERSION 2.8)

project("OpenGL-Sketches - Triangle")

if (UNIX)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/../../bin/linux")
  set(CMAKE_CXX_FLAGS "-g")
  #set(CMAKE_CXX_FLAGS "-s -O3")
  set(PLATFORM_LIB "GL")
elseif (WIN32)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/../../bin")
  set(PLATFORM_LIB "opengl32")
  link_directories("${CMAKE_SOURCE_DIR}/../../external/lib")
endif (UNIX)

include_directories("${CMAKE_SOURCE_DIR}/../../external/inc")
add_executable(triangle main.cc glew.c)
target_link_libraries(triangle glfw ${PLATFORM_LIB})
